//
// Created by wze-zero on 2024/9/13 013.
//
#include <iostream>

using namespace std;

int main() {
    int num, n = 0;
    cin >> num;
    while (num != 1) {
        num % 2 == 0 ? num /= 2 : num = num * 3 + 1;
        n++;
    }
    cout << n << endl;
    return 0;
}